lib/megar/crypto/support.rb
def base64_mpi_to_bn(s)
    data = base64urldecode(s)
    len = ((data[0].ord * 256 + data[1].ord + 7) / 8) + 2
    data[2,len+2].unpack('H*').first.to_i(16)
  end
# Returns multiple precision integer (MPI) as a big integers decoded from base64 string +s+
#
Returns multiple precision integer (MPI) as a big integers decoded from base64 string +s+
Returns multiple precision integer ( MPI ) as a big integers decoded from base64 string + s +
def base64_mpi_to_bn(s)
    data = base64urldecode(s)
    len = ((data[0].ord * 256 + data[1].ord + 7) / 8) + 2
    data[2,len+2].unpack('H*').first.to_i(16)
  end
def base64_mpi_to_bn ( s ) data = base64urldecode ( s ) len = ( ( data [ 0 ] . ord * 256 + data [ 1 ] . ord + 7 ) / 8 ) + 2 data [ 2 , len + 2 ] . unpack ( 'H*' ) . first . to_i ( 16 ) end
Returns multiple precision integer (MPI) as a big integers decoded from base64 string +s+
Returns multiple precision integer ( MPI ) as a big integers decoded from base64 string + s +
s