• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 6174938546

13 Sep 2023 04:00PM UTC coverage: 29.221% (+0.04%) from 29.185%
6174938546

push

web-flow
docs: update readme with latest release (#715)

Signed-off-by: Anton Baliasnikov <anton.baliasnikov@iohk.io>

3470 of 11875 relevant lines covered (29.22%)

0.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/shared/src/main/scala/io/iohk/atala/shared/models/Base64UrlString.scala
1
package io.iohk.atala.shared.models
2

3
import io.iohk.atala.shared.utils.Base64Utils
4
import scala.util.Try
5

6
opaque type Base64UrlString = String
7

8
object Base64UrlString {
1✔
9
  def fromStringUnsafe(s: String): Base64UrlString = s
×
10
  def fromString(s: String): Try[Base64UrlString] = Try(Base64Utils.decodeURL(s)).map(_ => s)
1✔
11
  def fromByteArray(bytes: Array[Byte]): Base64UrlString = Base64Utils.encodeURL(bytes)
12

13
  extension (s: Base64UrlString) {
1✔
14
    def toStringNoPadding: String = s.takeWhile(_ != '=')
1✔
15
    def toByteArray: Array[Byte] = Base64Utils.decodeURL(s)
×
16
    def toString: String = s
17
  }
18
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc