apidocs / com.srv4pos.server.api.infrastructure / SignService

SignService

class SignService

Spring-friendly class for signatures. Use


  # generate private key
  openssl genrsa -out mykey.pem 1024
  # generate public key
  openssl rsa -in mykey.pem -pubout > mykey.pub
  # create der files for keys
  openssl rsa -in mykey.pub -inform PEM -pubin -outform DER -out development.pub.der
  openssl pkcs8 -nocrypt -in mykey.pem -inform PEM -topk8 -outform DER -out mykey.pem.der
  
to generate certificates

User: Kirill, Date: 20.11.13 13:32

Functions

sign

static fun sign(data: ByteArray!, privKeyBytes: ByteArray!): ByteArray!

verifySignature

static fun verifySignature(data: ByteArray!, pubKeyBytes: ByteArray!, signature: ByteArray!): Boolean