[+] Implement send request

This commit is contained in:
Hykilpikonna
2021-01-12 15:01:44 -05:00
parent 357d1c0f0f
commit d2666491ec
3 changed files with 30 additions and 15 deletions
@@ -2,12 +2,10 @@ package org.hydev.ios.alarmclock
import org.springframework.http.ResponseEntity
import java.security.SecureRandom
import javax.crypto.SecretKeyFactory
import javax.crypto.spec.PBEKeySpec
import java.security.spec.KeySpec
import java.util.*
import javax.crypto.SecretKeyFactory
import javax.crypto.spec.PBEKeySpec
/**
* Generate "Bad Request" response entity
@@ -26,7 +24,7 @@ fun bad(msg: String): ResponseEntity<String> = ResponseEntity.badRequest().body(
fun randSalt(len: Int = 16): ByteArray
{
val random = SecureRandom()
val salt = ByteArray(16)
val salt = ByteArray(len)
random.nextBytes(salt)
return salt
}