Skip to content

Commit

Permalink
Rename Poly1305 => RbNaCl::OneTimeAuths::Poly1305
Browse files Browse the repository at this point in the history
This follows the naming convention from the C source code.

"OneTimeAuths" seems a bit silly but it is more consistent. Plus it's not a name
that end users will have to deal with directly (at least in a typical case)
  • Loading branch information
tarcieri committed Oct 22, 2013
1 parent 606028e commit 823fe9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rbnacl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BadSignatureError < CryptoError; end
require "rbnacl/group_elements/curve25519"

# One-time Authentication: Poly1305
require "rbnacl/authenticators/poly1305"
require "rbnacl/one_time_auths/poly1305"

# Hash functions: SHA256/512 and Blake2b
require "rbnacl/hash"
Expand All @@ -72,7 +72,7 @@ class BadSignatureError < CryptoError; end
SigningKey = Signatures::Ed25519::SigningKey
VerifyKey = Signatures::Ed25519::VerifyKey
GroupElement = GroupElements::Curve25519
OneTimeAuth = Authenticators::Poly1305
OneTimeAuth = OneTimeAuths::Poly1305
end

# Select platform-optimized versions of algorithms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# encoding: binary
module RbNaCl
module Authenticators
module OneTimeAuths
# Computes an authenticator using poly1305
#
# The authenticator can be used at a later time to verify the provenance of
Expand Down Expand Up @@ -28,7 +28,7 @@ class Poly1305 < Auth
sodium_function :onetimeauth_poly1305,
:crypto_onetimeauth_poly1305,
[:pointer, :pointer, :ulong_long, :pointer]

sodium_function :onetimeauth_poly1305_verify,
:crypto_onetimeauth_poly1305_verify,
[:pointer, :pointer, :ulong_long, :pointer]
Expand Down

0 comments on commit 823fe9b

Please sign in to comment.