aboutsummaryrefslogblamecommitdiff
path: root/src/main/scala/com/drivergrp/core/crypto.scala
blob: f693fa34cb8aad20d4b18b3c378691a560097dad (plain) (tree)
1
2
3
4
5

                          
                                        
 
               













                                                                                
package com.drivergrp.core

import com.drivergrp.core.auth.AuthToken

object crypto {

  final case class EncryptionKey(value: String)

  final case class DecryptionKey(value: String)

  trait Crypto {

    def keyForToken(authToken: AuthToken): EncryptionKey

    def encrypt(encryptionKey: EncryptionKey)(message: Array[Byte]): Array[Byte]

    def decrypt(decryptionKey: EncryptionKey)(message: Array[Byte]): Array[Byte]
  }
}