hiroaki-yamamoto/django-good-otp

View on GitHub
django_otp/widgets/coffee/generator.coffee

Summary

Maintainability
Test Coverage
window.generateOTPSecret = ->
  map = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
  return (map[Math.floor Math.random() * 32] for num in [0...16]).join ""